package test2;

import java.awt.AWTException;
import java.awt.GraphicsEnvironment;
import java.awt.Robot;
import java.util.Arrays;
import java.util.Random;

public class test1 {
	public void main(){
		System.out.println(Arrays.toString( "Idzie Grzes, przez wies. Worek niesie.".split(" ")));
		Robot robot = null;
		try {
			robot = new Robot();

		robot.mouseMove(0, 0);
		
		Random random = new Random();
		for (int i = 0; i < 20; i++) {
			int x, y;
			x = random.nextInt(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getWidth());
			y = random.nextInt(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getHeight());
			robot.mouseMove(x, y);
			Thread.sleep(500);
		}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
